<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:fragment="head(title)">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title th:replace="${title}">文章详情</title>
    <link rel="shortcut icon" href="../static/image/关于我.jpg" th:href="@{/image/关于我.jpg}" type="image/x-icon">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <link rel="stylesheet" href="../static/css/typo.css" th:href="@{/css/typo.css}">
    <link rel="stylesheet" href="../static/css/animate.css" th:href="@{/css/animate.css}">
    <link rel="stylesheet" href="../static/lib/prism/prism.css" th:href="@{/lib/prism/prism.css}">
    <link rel="stylesheet" href="../static/lib/tocbot/tocbot.css" th:href="@{/lib/tocbot/tocbot.css}">
    <link rel="stylesheet" href="../static/css/me.css" th:href="@{/css/me.css}">
</head>
<body>
<!-- 导航 -->
<nav th:fragment="menu(n)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small">
    <div class="ui container">
        <div style="display: flex; justify-content: center; align-items: center;">
            <div class="ui inverted secondary stackable menu" style="height: 60px;">
                <h2 class="ui teal header item">小圳博客</h2>
                <a href="#" th:href="@{/}" class="m-item item m-mobile-hide m-small-link"
                   th:classappend="${n==1} ? 'active'"><i
                        class="home icon"></i>首页</a>
                <a href="#" th:href="@{/types/-1}" class="m-item item m-mobile-hide m-small-link"
                   th:classappend="${n==2} ? 'active'"><i
                        class="idea icon"></i>分类</a>
                <a href="#" th:href="@{/tags/-1}" class="m-item item m-mobile-hide m-small-link"
                   th:classappend="${n==3} ? 'active'"><i
                        class="tags icon"></i>标签</a>
                <!--            <a href="#" th:href="@{/archives}" class="m-item item m-mobile-hide" th:classappend="${n==4} ? 'active'"><i-->
                <!--                    class="clone icon"></i>归档</a>-->
                <!--            <a href="#" th:href="@{/about}" class="m-item item m-mobile-hide" th:classappend="${n==5} ? 'active'"><i-->
                <!--                    class="info icon"></i>关于我</a>-->
                <div class="m-item item m-mobile-hide m-small-link">
                    <form name="search" action="#" th:action="@{/search}" method="get" target="_blank">
                        <div class="centre m-item right item m-mobile-hide">
                            <div class="ui icon input m-margin-tb-tiny">
                                <input type="text" name="query" placeholder="Search..." th:value="${query}"/>
                                <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="right m-item m-mobile-hide menu" th:if="${loginUser != null}">
                    <div class="ui dropdown item">
                        <div class="text">
                            <img class="ui avatar image" src="https://picsum.photos/id/1027/100/100"
                                 th:src="${loginUser.headerUrl}" style="width: 30px;height: 30px">
                            <span th:text="${loginUser.nickname}">小圳</span>
                        </div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <a href="#" th:href="@{/user/setting}" class="m-item item m-mobile-hide"
                               th:if="${loginUser != null}">
                                <i class="info icon"></i>账号设置</a>
                            <a href="#" th:href="@{/logoff}" class="m-item item m-mobile-hide"
                               th:if="${loginUser != null}">
                                <i class="info icon"></i>退出登录</a>
                        </div>
                    </div>
                </div>

                <a href="#" th:href="@{/login}" class="m-item item m-mobile-hide m-small-link"
                   th:if="${loginUser == null}">
                    <i class="info icon"></i>登录</a>
                <a href="#" th:href="@{/register}" class="m-item item m-mobile-hide m-small-link"
                   th:if="${loginUser == null}">
                    <i class="info icon"></i>注册</a>
                <a href="#" th:href="@{/admin/blogs}" class="m-item item m-mobile-hide m-small-link"
                   th:if="${loginUser != null}">
                    <i class="info icon"></i>博客后台</a>

                <a href="#" th:href="@{/message/0}" class="m-item item m-mobile-hide m-small-link"
                   th:if="${loginUser != null}">
                    <i class="info circle icon"></i>消息</a>
            </div>
        </div>
        <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
            <i class="sidebar icon"></i>
        </a>
    </div>
</nav>

<!-- 底部 -->
<footer th:fragment="footer" class="ui inverted vertical segment m-padded-tb-massive">
    <div class="ui center aligned container" style="height: 150px;">
        <div class="ui inverted divided stackable grid" style="height: 130px;">
            <div class="three wide column" style="height: 120px;">
                <div class="ui inverted link list">
                    <div class="item">
                        <img src="../static/image/小圳微信.png" th:src="@{/image/小圳微信.png}"
                             class="ui m-margin-top rounded image" alt="" style="width: 110px"/>
                    </div>
                </div>
            </div>
            <div class="three wide column" style="height: 120px;">
                <h4 class="ui inverted header m-text-thin m-text-spaced">最新博客</h4>
                <div id="newblog-container">
                    <div class="ui inverted link list" th:fragment="newblogList">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="item m-text-thin"
                           th:each="blog : ${newblogs}" th:text="${blog.title}">用户故事（User Story）</a>
                        <!--/*-->
                        <a href="#" class="item m-text-thin">用户故事（User Story）</a>
                        <a href="#" class="item m-text-thin">用户故事（User Story）</a>
                        <!--*/-->
                    </div>
                </div>
            </div>
            <div class="three wide column" style="height: 120px;">
                <h4 class="ui inverted header m-text-thin m-text-spaced">联系我</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">Email：2796830992@qq.com</a>
                    <a href="#" class="item">QQ：2796830992</a>
                </div>
            </div>
            <div class="seven wide column" style="height: 120px;">
                <h4 class="ui inverted header m-text-thin m-text-spaced">友链</h4>
                <div class="ui inverted link list">
                    <a href="http://47.120.7.29:8866/community/" class="item">小森：夕阳红交友贴吧</a>
                </div>
            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <p class="m-text-thin m-text-spaced m-opacity-tiny">xiaozhen-blog 2023.4.10</p>
    </div>
</footer>

<th:block th:fragment="script">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script>
    <script src="../static/lib/prism/prism.js" th:src="@{/lib/prism/prism.js}"></script>
    <script src="../static/lib/tocbot/tocbot.min.js" th:src="@{/lib/tocbot/tocbot.min.js}"></script>
    <script src="../static/lib/qrcode/qrcode.min.js" th:src="@{/lib/qrcode/qrcode.min.js}"></script>
    <script src="../static/lib/waypoints/jquery.waypoints.min.js"
            th:src="@{/lib/waypoints/jquery.waypoints.min.js}"></script>
    <script>
        $('#newblog-container').load(/*[[@{/footer/newblog}]]*/"/footer/newblog");
    </script>
</th:block>

</body>
</html>